import xss from 'xss'
export function closest(el, selector) {
  let matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;

  while (el) {
    if (matchesSelector.call(el, selector)) {
      break;
    }
    el = el.parentElement;
  }
  return el;
};

export function msgClearXss(content) {
  return xss(content,{
    whiteList: {
      img: ['src'],
      br:[]
    },
    stripIgnoreTag: true,
  })
}

export function aa (data) {
    console.log('aa', data);
}

